package cn.xhjava.crm.workbench.mapper;

import cn.xhjava.crm.workbench.domain.Activity;
import cn.xhjava.crm.workbench.domain.FunnelVO;

import java.util.List;
import java.util.Map;

public interface ActivityMapper {
    int deleteByPrimaryKey(String id) throws Exception;

    int insert(Activity record) throws Exception;

    int insertSelective(Activity record) throws Exception;

    Activity selectByPrimaryKey(String id) throws Exception;

    Activity selectDetailByPrimaryKey(String id) throws Exception;

    int updateByPrimaryKeySelective(Activity record) throws Exception;

    int updateByPrimaryKey(Activity record) throws Exception;

    /**
     * 根据条件分页查询市场活动的列表
     *
     * @param map
     * @return
     */
    List<Activity> selectForPage(Map<String, Object> map) throws Exception;

    int selectCountForPage(Map<String, Object> map) throws Exception;

    List<Activity> selectClueActivityRelationByClueId(String id) throws Exception;


    List<Activity> selectLikeName(String name) throws Exception;

    List<Activity> selectAll() throws Exception;

    List<Activity> selectActivityByNameAndClueId(Map<String, Object> map) throws Exception;

    List<Activity> selectContactsActivityRelationByContactsId(String id) throws Exception;

    List<Activity> selectActivityByNameAndContactsId(Map<String, Object> map) throws Exception;

    List<FunnelVO> queryActivityCountGroupByCreateTime();
}